import time
from machine import Pin

pin_index_list = [13, 12, 14, 27, 26]
led_pin_list = []

for i in pin_index_list:
    led_pin_list.append(Pin(i, Pin.OUT))
num = len(led_pin_list)

# LED全熄灭
for pin in led_pin_list:
    pin.value(0)

while True:
    for i in range(num):
        led_pin_list[i].value(1)
        if i == 0:
            led_pin_list[num - 1].value(0)
        else:
            led_pin_list[i - 1].value(0)
        time.sleep(0.2)
